home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0094-disable invalid Pas-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  1.0 KB  |  34 lines  |  [TEXT/GEOL]

  1. Item    4311852                         22-Aug-89        02:08
  2.  
  3. From:   D2215                           Dac SW, Wilma Blair,PRT
  4.  
  5. To:     MACDTS                          Macintosh Developer Tech. Supt.,APL
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    disable invalid Paste
  10.  
  11. I need to modify TNumberText (and some others) so that one cannot paste invalid
  12. characters into the dialog.
  13.  
  14. Unless there is a simple method I am overlooking, it would be necessary to add
  15. a function:
  16.  
  17. FUNCTION TNumberText.FilterChars (h: handle; theLength: INTEGER; dataType:
  18. resType): INTEGER;
  19.  
  20. that would remove invalid characters from the handle of text and return the new
  21. length.
  22.  
  23. This would be called from TDialogTeView.TTePasteCommand.ITePasteCommand right
  24. after it calls gApplication.GetDataToPaste as:
  25.  
  26. IF member (fEditText, 'an abstract type with the filter') THEN newLength:=
  27. TAbstractType(fEditText).FilterChars (newText, newLength, dataType);
  28.  
  29. Is there a simpler way or must I kludge this up?
  30.  
  31. Regards, Les Caudle
  32.  
  33.  
  34.